package com.hth.stockspiderv3;

public class ConstConfig {
    private static String HTTP_ALL_STOCK_URL = "";

    private static String HTTP_URL = "https://gushitong.baidu.com/opendata?openapi=1&dspName=iphone&tn=tangram&client=app&query=001331&code=001331&word=001331&resource_id=5429&ma_ver=4&finClientType=pc";
    // "&end_time=1648137600&count=90"
    private static String HTTP_K_URL = "https://finance.pae.baidu.com/selfselect/getstockquotation?code=%s&all=1&ktype=%s&isIndex=false&isBk=false&isBlock=false&isFutures=false&stockType=ab&group=quotation_kline_ab&finClientType=pc&end_time=%d&count=200";
    private static String HTTP_PANKOU_URL = "https://gushitong.baidu.com/opendata?openapi=1&dspName=iphone&tn=tangram&client=app&query=%s&code=001331&word=%s&resource_id=5429&ma_ver=4&finClientType=pc";

    private static String HTTP_CODE_URL = "http://5.push2.eastmoney.com/api/qt/clist/get?cb=jQuery112408764802565644767_1669189725554&pn=%d&pz=%d&po=1&np=1&ut=bd1d9ddb04089700cf9c27f6f7426281&fltt=2&invt=2&wbp2u=|0|0|0|web&fid=f3&fs=m:0+t:6,m:0+t:80,m:1+t:2,m:1+t:23,m:0+t:81+s:2048&fields=f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f12,f13,f14,f15,f16,f17,f18,f20,f21,f23,f24,f25,f22,f11,f62,f128,f136,f115,f152&_=1669189725555";
    public static String getHttpAllStockUrl() {
        return HTTP_ALL_STOCK_URL;
    }
    public static String HTTP_F10_URL = "http://emweb.securities.eastmoney.com/PC_HSF10/OperationsRequired/PageAjax?code=%s";

    public static String HTTP_POST_STOCK_CALL_AUCTION_URL = "https://mygu588.cn/query_dp/?tb=1";

    public static String getHttpUrl() {
        return HTTP_URL;
    }

    /**
     * 获取历史k线信息
     * @param code
     * @param kType @see com.hth.stockspiderv3.KLineEnum
     * @param timeStamp 时间戳秒级
     * @return
     */
    public static String getHttpKUrl(String code, String kType, Integer timeStamp) {
        return String.format(HTTP_K_URL, code, kType, timeStamp);
    }

    /**
     * 获取当天盘口信息
     * @param code
     * @return
     */
    public static String getHttpPankouUrl(String code) {
        return String.format(HTTP_PANKOU_URL, code, code);
    }

    /**
     *
     * @param pageNumber
     * @param pageSize
     * @return
     */
    public static String getHttpCodeUrl(Integer pageNumber, Integer pageSize) {
        return String.format(HTTP_CODE_URL, pageNumber, pageSize);

    }

    /**
     * 获取F10 信息的url
     * @param code
     * @return
     */
    public static String getHttpF10Url(String code) {
        return String.format(HTTP_F10_URL, code);
    }
}
